//
//  RankingListViewModel.m
//  YanMusicPlayer
//
//  Created by 1564335 on 15-6-13.
//  Copyright (c) 2015年 胡岩 All rights reserved.
//

#import "RankingListViewModel.h"


@implementation RankingListViewModel

- (instancetype)initWithDic:(NSDictionary *)dic
{
    _songList = [NSMutableArray array];
    self = [super init];
    if (self) {
        _rankList_Id = dic[@"id"];
        _title = dic[@"title"];
        _time = dic[@"time"];
        _pic_url = dic[@"pic_url"];
        _big_pic_url = dic[@"big_pic_url"];
        _count = dic[@"count"];
        _details = dic[@"details"];
        NSArray *array = dic[@"songlist"];
        if (array.count > 0) {
            for (NSDictionary *dic in array) {
                RankingListViewSongListModel *model = [[RankingListViewSongListModel alloc] initWithDic:dic];
                [_songList addObject:model];
            }
        }
    }
    return self;
}

@end
